package blog

import (
	"encoding/xml"
)

type Item struct {
	XMLName       xml.Name     `xml:"item"`
	Title         string       `xml:"title"`
	Link          string       `xml:"link"`
	Description   xml.CharData `xml:"description"`
	Category      []string     `xml:"category"`
	PubDate       string       `xml:"pubDate"`
	LastBuildDate string       `xml:"lastBuildDate"`
}

type Channel struct {
	XMLName       xml.Name `xml:"channel"`
	Title         string   `xml:"title"`
	Link          string   `xml:"link"`
	Description   string   `xml:"description"`
	PubDate       string   `xml:"pubDate"`
	LastBuildDate string   `xml:"lastBuildDate"`
	Language      string   `xml:"language,omitempty"`
	Copyright     string   `xml:"copyright,omitempty"`
	Generator     string   `xml:"generator,omitempty"`
	Image         string   `xml:"image,omitempty"`
	Item          []Item   `xml:"item,omitempty"`
}

type RSS struct {
	XMLName xml.Name `xml:"rss"`
	Version string   `xml:"version,attr"`
	Channel Channel
}
